<template>
  <span :class="undo">{{index+1}}: {{item}}</span>
</template>

<script>
  export default {
    props: ['item', 'index'],
    computed: {
      undo() {
        if (this.item == '正确') {
          return 'right'
        } else if (this.item == '错误') {
          return 'error'
        } else {
          return "undo"
        }
      }
    }
  };
</script>

<style scoped>
  .right {
    color: green;
  }

  .error {
    color: red;
  }

  .undo {
    color: #ccc;
  }
</style>